﻿using SqlSugar;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Security.Principal;
using System.Text;
using System.Threading.Tasks;

namespace MyBlog.Model.Entity
{
    public class User
    {
        [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
        public int Id { get; set; }

        [Display(Name = "用户名")]
        [Required, MaxLength(50)]
        public string Name { get; set; }

        [Display(Name = "密码")]
        [Required, MaxLength(20)]
        public string Password { get; set; }

        [Display(Name = "昵称")]
        [Required, MaxLength(50)]
        public string NickName { get; set; }

        [Display(Name = "联系电话")]
        [Required, MaxLength(11)]
        public string Phone { get; set; }

        [Display(Name = "邮箱")]
        public string? Email { get; set; }


    }
}
